{% load i18n %}
<li class="dropdown-submenu">
    <a>{% blocktrans with filter_title=title %} By {{ filter_title }} {% endblocktrans %}</a>
    <ul class="dropdown-menu">
        {% for choice in choices %}
            <li{% if choice.selected %} class="active"{% endif %}>
                <a href="{{ choice.query_string|iriencode }}">{{ choice.display }}</a></li>
        {% endfor %}
    </ul>
</li>